Repository navigation
refactor(queue): name retry_download's hold read-back, and document the shared history read for two more tools - #702
Merged
Conversation
…he shared history read for two more tools retry_download's `applied` read its hold back with a `find()` inside the object spread of its outcome. That expression is now `holdOf`, next to `HOLD_FIELDS`, exported and tested on its own: the hold whose fields are exactly the flags set, whatever their order. SABnzbd's history read is shared for ten seconds while it shows a download in post-processing (bardesss#700), so for up to ten seconds after the wait ends a queue paused by hand can still read as the wait. The pause_downloads section of docs/tools.md said so; the diagnose_media and retry_download sections now say it too, and the pause_downloads section words the resume preview's wait sentence as the condition it is. Each paragraph is re-wrapped from the changed line on. get_queue makes the same read but reports no hold (its rows leave `heldBy` out), so its section needs nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your three optional notes on #700.
find(hold => HOLD_FLAGS.every(...))inretry_download'sappliedis nowholdOf(r), next toHOLD_FIELDS, exported and tested on its own: one case per hold, no flags, and two flags no hold has together.diagnose_mediaandretry_downloadsections ofdocs/tools.mdnow say that for up to ten seconds after the wait ends, a queue paused by hand can still read as the wait, as thepause_downloadssection already did; each paragraph is re-wrapped from the changed line on.get_queuemakes the same history read but reports no hold (projectinsrc/tools/getQueue.tsleavesheldByout of its rows), so its section needs nothing.resumeLineandWAIT_TEXT.resumeinsrc/tools/pauseDownloads.ts). The resume is sent either way, so the preview holds when the wait has just ended too. Thepause_downloadssection ofdocs/tools.mddescribed it without that condition ("its preview says that downloading starts once the wait ends"), and now adds "if SABnzbd is waiting". I can reword the preview itself if you would rather.No tool description, preview or other client text changes.
Verified
The
holdOfcases fail with a read-back that takes a hold whose fields are only some of those set, and with one that takes a hold whose fields include all those set. Theretry_downloadtests that read each hold back pass unchanged.Gates on Node 24.22.2: lint, typecheck, build and codegen exit 0 with no generated diff, and 207 test files / 7,188 tests pass (main: 7,182).